﻿#include "uimain_window.h"

#include <shlib/iottypedef.h>
#include <shlib/csigmanager.h>
#include <model/uimodelmanage.h>
#include <model/device/uidevicemanage.h>
#include <model/uimodelinfo.h>

#include <ElaMenuBar.h>
#include <ElaMenu.h>
#include <ElaToolBar.h>
#include <ElaToolButton.h>
#include <ElaProgressBar.h>
#include <ElaStatusBar.h>
#include <ElaText.h>



UiMainWindow::UiMainWindow(QWidget *parent) :
    ElaWindow(parent)
{
    initWindow();
    initEdgeLayout();
    initContent();
}

UiMainWindow::~UiMainWindow()
{

}

void UiMainWindow::initWindow() {
    setWindowIcon(QIcon(":/include/Image/Cirno.jpg"));
    resize(1024, 600);
    setUserInfoCardPixmap(QPixmap(":/Resource/Image/Cirno.jpg"));
    setUserInfoCardTitle("Ela Tool");
    setUserInfoCardSubTitle("psq2207249@163.com");
    setWindowTitle("物联网平台");
}

void UiMainWindow::initEdgeLayout()
{

}

void UiMainWindow::initContent()
{
    QString datavasestr = "database";
    QString modelmanagestr = "modelmanage";
    addExpanderNode("数据模型", datavasestr, ElaIconType::Database);
    addPageNode("模型维护", new UiModelInfo, datavasestr, 3, ElaIconType::LayerGroup);
    addPageNode("设备维护", new UiDeviceManage, datavasestr, 99, ElaIconType::SpaceStationMoon);
}
